/**
 * 延保提醒
 *
 * @Author: gxp
 * @Date: 2019/11/25
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 查询延保提醒
export const getExtendWarrantyRemindTable = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/extendWarrantyRemind/queryRemind`, { params });
// 查询车辆
export const getOwnerVehicle = ownerNo => axios.get(`${SERVER.DMSCLOUD_REPAIR}/extendWarrantyRemind/getOwnerVehicle/${ownerNo}`, {});

// 保存
export const saveRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/extendWarrantyRemind/careSave`, params);
// 已关怀
export const queryCared = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/extendWarrantyRemind/queryCared`, { params });
// 再次关怀
export const queryCaringAgain = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/extendWarrantyRemind/queryCaringAgain`, { params });
// 导出延保提醒
export const exportExtendWarrantyRemind = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/extendWarrantyRemind/export`, { params, responseType: 'arraybuffer' });
// 品牌 - 下拉框
export const getPinpSelect = params =>
  axios.get(`/api/basedata/vehicleProduct/brandsqueryall`, {
    params
  });
// 服务顾问 - 下拉框
export const getUserListSelect = params =>
  axios.get(`/api/sysManage/basedata/users/getUserListByRole?role=10071011`, {
    params
  });

  // 延保提醒回访导出
export const YBexport1 = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/extendWarrantyRemind/export/excal`, { params, responseType: 'arraybuffer' });

// 延保提醒回访导出
export const YBexport2 = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/extendWarrantyRemind/queryCared/export/excal`, { params, responseType: 'arraybuffer' });

// 延保提醒回访导出
export const YBexport3 = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/extendWarrantyRemind/queryCaringAgain/export/excal`, { params, responseType: 'arraybuffer' });
